package com.yjian.dao.bean;

import com.fasterxml.jackson.annotation.JsonIgnore;

/**
 * Created by xuxiaobao on 2017/9/27.
 */
public class PayLog {
    private Long id;
    private String mid;
    private Double money;
    private Integer number;
    private Integer payType;
    private Long createTime;

    @JsonIgnore
    private String query_sql;

    public void initQuerySql(boolean mid, boolean money, boolean number,boolean payType, boolean createTime) {
        StringBuilder sb = new StringBuilder();
        sb.append("id,");
        if (mid) sb.append("mid,");
        if (money) sb.append("money,");
        if (number) sb.append("number,");
        if (payType) sb.append("payType,");
        if (createTime) sb.append("createTime,");
        sb.replace(sb.lastIndexOf(","), sb.length(), "");
        query_sql = sb.toString();
    }

    public Long getId() {
        return id;
    }

    public String getMid() {
        return mid;
    }

    public Double getMoney() {
        return money;
    }

    public Integer getNumber() {
        return number;
    }

    public Long getCreateTime() {
        return createTime;
    }

    public String getQuery_sql() {
        return query_sql;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public void setMid(String mid) {
        this.mid = mid;
    }

    public void setMoney(Double money) {
        this.money = money;
    }

    public void setNumber(Integer number) {
        this.number = number;
    }

    public Integer getPayType() {
        return payType;
    }

    public void setPayType(Integer payType) {
        this.payType = payType;
    }

    public void setCreateTime(Long createTime) {
        this.createTime = createTime;
    }
}
